<?php
header("Access-Control-Allow-origin:*");
$key=$_POST["keyword"];
$page=$_POST["page"] ? $_POST["page"] : 1;
$pagesize=20;
$start=($page-1)*$pagesize+1;
$end=$page*$pagesize;
$arr=array();
if($key=="格力" || $key=="格力空调"){
	for ($i=$start; $i <$end ; $i++) { 
		$arr[]=array("name"=>"格力".$i,"address"=>"地址".$i,"biz_id"=>722,"pic"=>"https://wnworld.com/chechedai/uploads/01.png");
	}
	
}elseif($key=="空调"){
	if($page==2){
		for ($i=$start; $i <($end-10) ; $i++) { 
			$arr[]=array("name"=>"空调".$i,"address"=>"地址".$i,"biz_id"=>909,"pic"=>"https://wnworld.com/chechedai/uploads/01.png");
		}
	}else{
		for ($i=$start; $i <$end ; $i++) { 
			$arr[]=array("name"=>"空调".$i,"address"=>"地址".$i,"biz_id"=>909,"pic"=>"https://wnworld.com/chechedai/uploads/01.png");
		}
	}
	

}elseif($key=="手机"){
	for ($i=$start; $i <$end ; $i++) { 
		$arr[]=array("name"=>"手机".$i,"address"=>"地址".$i,"biz_id"=>726,"pic"=>"https://wnworld.com/chechedai/uploads/01.png");
	}
}
echo json_encode($arr);

?>